<?php
namespace app\index\controller;
use think\Controller;
use think\Db;
class Redbag extends Controller
{
    public function redbag()
    {
    	return $this->fetch('redbag');
    }
    public function select()
    {
    	$res=Db::table('red_bag')->select();
    	if($res){
    		echo json_encode(['code'=>200,'msg'=>'成功','res'=>$res]);die;
    	}else{
    		echo json_encode(['code'=>4003,'msg'=>'失败']);die;
    	}
    }
    public function redbag_detail()
    {
    	return $this->fetch('redbag_detail');
    }
}
